<?php

// Requires won't be used in autoloading environment
require_once('Dropbox/API.php');
require_once('Dropbox/OAuth/Consumer/ConsumerAbstract.php');
require_once('Dropbox/OAuth/Consumer/Curl.php');
require_once('Dropbox/OAuth/Storage/StorageInterface.php');
require_once('Dropbox/OAuth/Storage/Session.php');

$key      = 'b1zlgadjvazrz03';  // Your Consumer Key
$secret   = 'z16dnj657mm0zem';  // Your Consumer Secret
$callback = 'http://www.dondeaprendo.com/_dropbox/benthe/index.php'; // Your Authorisation Callback URL

$storage = new \Dropbox\OAuth\Storage\Session;
$OAuth = new \Dropbox\OAuth\Consumer\Curl($key, $secret, $storage, $callback);
$dropbox = new \Dropbox\API($OAuth);

$info = $dropbox->accountInfo();

print_r($_SESSION);

//var_dump($info);
/*
// Upload the readme for this lib to the root of your dropbox
$put = $dropbox->putFile(realpath('readme.md'));
var_dump($put);
*/
?>